package com.lisx.module_add_new_word.ocr;

import com.blankj.utilcode.util.LogUtils;
import com.sy.lib_secretkey.BaseCallBackListener;
import com.sy.lib_secretkey.SecretkeyUtils;

public class SecretInitUtil {
    public static String appkey;

    public static String secretKey;



    public static String getAppkey(){
        return appkey;
    }

    public static String getSecretKey(){
        return secretKey;
    }

    public static void initbdyKey(String appid,String keyName){
        //实际项目中这些参数由后台获取
        SecretkeyUtils.getSecretkey("", keyName, new BaseCallBackListener<String>() {
            @Override
            public void onSuccess(String data) {
                String[] strings = SecretkeyUtils.formatKey(data);
                appkey = strings[0];
                secretKey = strings[1];

            }

            @Override
            public void onFailed(String error) {

            }

            @Override
            public void onHandlerStart() {

            }
        });
    }
}
